package com.flying.test;


/**
 * @ClassName:
 * @author: flying
 * @date 2024 2024/12/13 14:34
 * @Description:
 */
public class Circle {

    // 成员变量

    private Point center;  // 圆心
    private double radius; // 半径

    public Circle() {
    }

    public Circle(Point center, double radius) {
        this.center = center;
        this.radius = radius;
    }


    public Point getCenter() {
        return center;
    }

    public void setCenter(Point center) {
        this.center = center;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }



    // 计算面积方法

    public double countArea(){
        return Math.PI*this.radius*this.radius;
    }


    @Override
    public String toString() {
        return "Circle{" +
               "center=" + center +
               ", radius=" + radius +
               '}';
    }
}
